﻿using System;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Web.HtmlControls.Descriptions;
using Jayden.Dll.Web.HtmlControls.Generics;
using Jayden.Dll.Web.HtmlControls.Interfaces;

namespace Jayden.Dll.Web.HtmlControls
{
	public class Area : HtmlElement, WithHRef, WithAlt, WithTarget, WithType
	{
		public Area() : base(AreaDescription.Instance) { }

		public string Alt { get { return this["alt"]; } set { this["alt"] = value; } }
		public string HRef { get { return this["href"]; } set { this["href"] = value; } }
		public string Target { get { return this["target"]; } set { this["target"] = value; } }
		public string Rel { get { return this["rel"]; } set { this["rel"] = value; } }
		public string HRefLang { get { return this["hreflang"]; } set { this["hreflang"] = value; } }
		public string Media { get { return this["media"]; } set { this["media"] = value; } }
		public string Type { get { return this["type"]; } set { this["type"] = value; } }
		public string Shape { get { return this["shape"]; } set { this["shape"] = value; } }
		public string Coords { get { return this["coords"]; } set { this["coords"] = value; } }
	}
	public class AreaDescription : HtmlElementDescription
	{
		public static readonly AreaDescription Instance = new AreaDescription();
		private AreaDescription() : base("area", HtmlVersion.Html4, false, false) { }
		public override Type ControlType { get { return typeof(Area); } }
		public override string Description { get { return "either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map."; } }
	}
}
